#include <stdio.h>				
#include <stdlib.h>				
#include <ctype.h>				
#include <string.h>				

int yylex(){					
  char     buff[256];
  char     *type;				
  int      c, i = 0;				

  while( (c=getchar())==' ' );			
  if( c=='\n'
      ||  c=='.' )  { fprintf(stderr,"<PUNC: %c>", c); return c;}
  if( c==EOF  ) { return c; } 	                

  while( isalpha(c) ) {                         
    buff[i++] = c;                              
    c = getchar();                              
  }
  if ((strcmp(buff,"a") == 0) || (strcmp(buff,"an") == 0) || (strcmp(buff,"the") == 0)) {
    type="ART";
  }
  else if ((strcmp(buff,"cut") == 0) || (strcmp(buff,"cuts") == 0)) {
    type="TRANS_VRB";
  }
  else if ((strcmp(buff,"bill") == 0) || (strcmp(buff,"bills") == 0)) {
    type="COMM_NOUN";
  }
  else if ((strcmp(buff,"Bell") == 0) || (strcmp(buff,"Verizon") == 0)) {
    type="PROP_NOUN";
  }

  buff[i]   = '\0';				
  fprintf(stderr,"<%s: %s>", type, buff);
  		
  if( c != EOF ) ungetc(c,stdin);		

  return c;				        
}

int main() 		 
{
  int c;

  do 
    {
      c = yylex();  
    } while (c != EOF);

  return EXIT_SUCCESS;
}            

